import request from '@/utils/axios';
import appName from "@/api/appName";

// 根据条件查询直联核保详细信息
export function queryPreUnderDetailsApi(params) {
    return request({
        url: appName.PREUNDER + '/direct/preUnder/queryPreUnderDetails',
        method: 'post',
        data: params
    })
}

// 消息下发通知接口
export function doSendApi(seqnum) {
    return request({
        url: appName.PREUNDER + '/send/notify/doSend?seqnum='+seqnum,
        method: 'post'
    })
}

// 保存消息通知接口
export function saveMsgInfoApi(params) {
    return request({
        url: appName.PREUNDER + '/send/notify/saveMsgInfo',
        method: 'post',
        data: params
    })
}

// 查询消息通知接口
export function queryMsgInfoApi(seqnum) {
    return request({
        url: appName.PREUNDER + `/send/notify/queryMsgInfo?seqnum=${seqnum}`,
        method: 'post'
    })
}

// 删除消息通知接口
export function deleteMsgInfoApi(id,updateId) {
    return request({
        url: appName.PREUNDER + `/send/notify/deleteMsgInfo?id=${id}&updateId=${updateId}`,
        method: 'post'
    })
}

// 更新消息通知为已回复接口
export function updateMsgInfoStatusApi(id,updateId) {
    return request({
        url: appName.PREUNDER + `/send/notify/updateMsgInfoStatus?id=${id}&updateId=${updateId}`,
        method: 'post'
    })
}

// 更新主档表状态
export function updateMsgInfoByMainApi(seqnum) {
    return request({
        url: appName.PREUNDER + `/send/notify/updateMsgInfoByMain?seqnum=${seqnum}`,
        method: 'post'
    })
}

// 提交初审/复审
export function commitPreAuditApi(params) {
    return request({
        url: appName.PREUNDER + '/direct/preUnder/commitPreAudit',
        method: 'post',
        data: params
    })
}

// 影像上传接口
export function imageUploadApi(params) {
    return request({
        url: appName.PREUNDER + '/preuder/uploadImage',
        method: 'post',
        data: params
    })
}

// 影像上传接口
export function uploadImageSaveApi(params) {
    return request({
        url: appName.PREUNDER + '/preuder/uploadImageSave',
        method: 'post',
        data: params
    })
}

// 影像上传接口
export function convertImgTypeApi(params) {
    return request({
        url: appName.PREUNDER + '/preuder/convertImgType',
        method: 'post',
        data: params
    })
}

// 查询影像信息接口
export function queryUploadImageApi(seqnum) {
    return request({
        url: appName.PREUNDER + `/preuder/queryUploadImage?seqnum=${seqnum}`,
        method: 'post'
    })
}

// 查询主档表状态接口
export function queryPreUnderWritingStatusApi(seqnum,procecode) {
    return request({
        url: appName.PREUNDER + `/direct/preUnder/queryPreUnderWritingStatus?seqnum=${seqnum}&procecode=${procecode}`,
        method: 'post'
    })
}

// 加锁
export function addLockApi(params) {
    return request({
        url: appName.PREUNDER + '/checkout/lock/addLock',
        method: 'post',
        data: params
    })
}

// 查询锁状态
export function queryLockStatusApi(params) {
    return request({
        url: appName.PREUNDER + '/checkout/lock/queryLockStatus',
        method: 'post',
        data: params
    })
}

// 保存接口
export function savePreAuditApi(params) {
    return request({
        url: appName.PREUNDER + '/direct/preUnder/savePreAudit',
        method: 'post',
        data: params
    })
}

// 删除文件接口
export function deletePreUnderImageApi(params) {
    return request({
        url: appName.PREUNDER + '/preuder/deletePreUnderImage',
        method: 'post',
        data: params
    })
}

// 下载图片接口
export function downloadPreUderImageApi(params) {
    return request({
        url: appName.PREUNDER + `/preuder/downloadPreUderImage?path=${params}`,
        method: 'post',
    })
}

// 消息处理保存提交
export function commitWaitReplyApi(params) {
    return request({
        url: appName.PREUNDER + '/direct/preUnder/returnAudit',
        method: 'post',
        data: params
    })
}

// 消息处理保存提交
export function getNotifyStatusApi(params) {
    return request({
        url: appName.PREUNDER + '/direct/preUnder/getNotifyStatus',
        method: 'post',
        data: params
    })
}

// 查询最高限额
export function insuredamountApi(params) {
    return request({
        url: appName.IMGOUT + '/third/amount/calculation/insuredamount',
        method: 'post',
        data: params
    })
}